package com.example.parkinglotmanagementsystem;

/**
 * 小轿车类
 */
public class SedanCar extends Vehicle{
    /**
     * 车箱数
     */
    public int carriageNumber;

    public SedanCar(int id, String number, String company, String time, String type, float totalKilo, float consumption, float maintenanceExpense, float roadMaintenanceExpense, float totalExpense, int carriageNumber) {
        super(id, number, company, time, type, totalKilo, consumption, maintenanceExpense, roadMaintenanceExpense, totalExpense);
        this.carriageNumber = carriageNumber;
    }

    public SedanCar(){
        super();
        this.carriageNumber = 0;
    }

    @Override
    public String getAllProperty() {
        return getId() + " " + getNumber() + " " + getCompany() + " " + getTime() + " "
                + getType() + " " + getTotalKilo() + " " + getConsumption() + " " + getMaintenanceExpense() + " "
                + getRoadMaintenanceExpense() + " " + getTotalExpense() + " "
                + "-1 " + getCarriageNumber() + " -1" + "\r\n";
    }

    @Override
    public String getUniqueAttributes(){
        return String.valueOf(carriageNumber);
    }

    public int getCarriageNumber() {
        return carriageNumber;
    }

    public void setCarriageNumber(int carriageNumber) {
        this.carriageNumber = carriageNumber;
    }
}
